package com.google.code.geocoder.model;

import java.io.Serializable;
import java.util.List;

public class DirectionsResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    private DirectionsStatus status;
    private List<DirectionsRoute> routes;

    public DirectionsResponse() {
    }

    public DirectionsStatus getStatus() {
        return status;
    }

    public void setStatus(DirectionsStatus status) {
        this.status = status;
    }

    public List<DirectionsRoute> getRoutes() {
        return routes;
    }

    public void setRoutes(List<DirectionsRoute> routes) {
        this.routes = routes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DirectionsResponse that = (DirectionsResponse) o;

        if (routes != null ? !routes.equals(that.routes) : that.routes != null) return false;
        if (status != that.status) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = status != null ? status.hashCode() : 0;
        result = 31 * result + (routes != null ? routes.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "DirectionsResponse{" +
                "status=" + status +
                ", routes=" + routes +
                '}';
    }
}
